package com.kede.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 验收记录
 * @TableName t_zhi_good_valid_fail
 */
@TableName(value ="t_zhi_good_valid_fail")
@Data
public class ZhiGoodValidFailDomain implements Serializable {
    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 物品id 关联 zhi_order_goods_list中的id
     */
    @TableField(value = "good_id")
    private Integer goodId;

    /**
     * 门店id
     */
    @TableField(value = "store_id")
    private Integer storeId;

    /**
     * 物品分类名称
     */
    @TableField(value = "cate_name")
    private String cateName;

    /**
     * 置换商品图片
     */
    @TableField(value = "images")
    private String images;

    /**
     * 置换商品信息
     */
    @TableField(value = "message")
    private String message;

    /**
     * 置换状态1待验收 2 验收通过 3验收失败
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 失败原因
     */
    @TableField(value = "reason")
    private String reason;

    /**
     * 区代理id
     */
    @TableField(value = "qu_id")
    private Integer quId;

    /**
     * 是代理id
     */
    @TableField(value = "shi_id")
    private Integer shiId;

    /**
     * 默认门店价格元
     */
    @TableField(value = "default_store_money")
    private BigDecimal defaultStoreMoney;

    /**
     * 默认区代价格元
     */
    @TableField(value = "default_qu_money")
    private BigDecimal defaultQuMoney;

    /**
     * 默认市代价格元
     */
    @TableField(value = "default_shi_money")
    private BigDecimal defaultShiMoney;

    /**
     * 确认置换时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 验收时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    @TableField(value = "transport_id")
    private Integer transportId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ZhiGoodValidFailDomain other = (ZhiGoodValidFailDomain) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getGoodId() == null ? other.getGoodId() == null : this.getGoodId().equals(other.getGoodId()))
            && (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId()))
            && (this.getCateName() == null ? other.getCateName() == null : this.getCateName().equals(other.getCateName()))
            && (this.getImages() == null ? other.getImages() == null : this.getImages().equals(other.getImages()))
            && (this.getMessage() == null ? other.getMessage() == null : this.getMessage().equals(other.getMessage()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getReason() == null ? other.getReason() == null : this.getReason().equals(other.getReason()))
            && (this.getQuId() == null ? other.getQuId() == null : this.getQuId().equals(other.getQuId()))
            && (this.getShiId() == null ? other.getShiId() == null : this.getShiId().equals(other.getShiId()))
            && (this.getDefaultStoreMoney() == null ? other.getDefaultStoreMoney() == null : this.getDefaultStoreMoney().equals(other.getDefaultStoreMoney()))
            && (this.getDefaultQuMoney() == null ? other.getDefaultQuMoney() == null : this.getDefaultQuMoney().equals(other.getDefaultQuMoney()))
            && (this.getDefaultShiMoney() == null ? other.getDefaultShiMoney() == null : this.getDefaultShiMoney().equals(other.getDefaultShiMoney()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getGoodId() == null) ? 0 : getGoodId().hashCode());
        result = prime * result + ((getStoreId() == null) ? 0 : getStoreId().hashCode());
        result = prime * result + ((getCateName() == null) ? 0 : getCateName().hashCode());
        result = prime * result + ((getImages() == null) ? 0 : getImages().hashCode());
        result = prime * result + ((getMessage() == null) ? 0 : getMessage().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getReason() == null) ? 0 : getReason().hashCode());
        result = prime * result + ((getQuId() == null) ? 0 : getQuId().hashCode());
        result = prime * result + ((getShiId() == null) ? 0 : getShiId().hashCode());
        result = prime * result + ((getDefaultStoreMoney() == null) ? 0 : getDefaultStoreMoney().hashCode());
        result = prime * result + ((getDefaultQuMoney() == null) ? 0 : getDefaultQuMoney().hashCode());
        result = prime * result + ((getDefaultShiMoney() == null) ? 0 : getDefaultShiMoney().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", goodId=").append(goodId);
        sb.append(", storeId=").append(storeId);
        sb.append(", cateName=").append(cateName);
        sb.append(", images=").append(images);
        sb.append(", message=").append(message);
        sb.append(", status=").append(status);
        sb.append(", reason=").append(reason);
        sb.append(", quId=").append(quId);
        sb.append(", shiId=").append(shiId);
        sb.append(", defaultStoreMoney=").append(defaultStoreMoney);
        sb.append(", defaultQuMoney=").append(defaultQuMoney);
        sb.append(", defaultShiMoney=").append(defaultShiMoney);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}